<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/styles/style.css" />
<link type="text/css" href="${pageContext.request.contextPath }/scripts/jquery-ui-1.8.16.custom/css/sunny/jquery-ui-1.8.16.custom.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/styles/rooms.css" />
<title>Hotel project</title>
</head>
<body>
	<jsp:include page="parts/header.jsp"/>
	
	
	
	<div id="main" class="ui-widget-content form_pad">
	<jsp:include page="parts/choiceBar.jsp"></jsp:include>
	
		<div id="content">
			<h1>Rooms</h1>
		<hr/>
		
		<table id="tablePictures" id="tableRooms">
		
		<c:forEach var="element" items="${rooms}" varStatus="status">
			<c:set var="tablewidth" value="3"/>
			
				<c:if test="${status.index % tablewidth == 0}">
					<tr class="roomTableTR">
				</c:if>
				
					<td  class="roomTableTD">
						<a href='<c:url value="controller?command=chosenRoom&id=${element.hotelRoomId}"></c:url>'>
						<img id="image" alt="" src="pictures/small/${element.smallPhoto}"/>
						<h4 class="article">${element.classRoom}     ${element.price}$</h4>
						</a>
					<td/>
					
				<c:if test="${status.index +1 % tablewidth == 0}">
					</tr>
				</c:if>
		</c:forEach>
		
		</table>
	
		<hr/>
		<p></p>
		</div>
		
		
	</div>
	
	<jsp:include page="parts/footer.jsp"/>
</body>
</html>